package dongshi.daddy.strategy;

public class StrategyClient {
    public static void main(String[] args) {
        PayAmountContext payAmountContext = new PayAmountContext();
        // 使用直减策略
        payAmountContext.setPayAmount(new DecreasePayAmountStrategy());
        payAmountContext.payAmount(null);
        // 使用N元购策略
        payAmountContext.setPayAmount(new NYuanPayAmountStrategy());
        payAmountContext.payAmount(null);
        // 使用满减策略
        payAmountContext.setPayAmount(new CouponPayAmountStrategy());
        payAmountContext.payAmount(null);
        // 使用折扣策略
        payAmountContext.setPayAmount(new DiscountPayAmountStrategy());
        payAmountContext.payAmount(null);
    }
}
